package reduce.fz.com.reduce.custom;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import reduce.fz.com.reduce.R;

/**
 * Created by qingshengzheng on 15/11/9.
 * 设置页面选项
 */
public class SettingItem extends RelativeLayout {
    private Context context;
    private LayoutInflater layoutInflater;
    private TextView mTvTitle;
    public SettingItem(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.context=context;
        this.layoutInflater=LayoutInflater.from(context);
        initView();
        TypedArray a=context.obtainStyledAttributes(attrs,R.styleable.SettingItem);
        String title=a.getString(R.styleable.SettingItem_si_title);
        mTvTitle.setText(title);
    }
    public void initView()
    {
        View view=layoutInflater.inflate(R.layout.view_setting_item,null);
        mTvTitle= (TextView) view.findViewById(R.id.tv_title);
    }
}